<h3>编辑循环</h3>

<% form_for(@cycle,:html=>{:multipart=>true}) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :link ,"链接"%>
    <%= f.text_field :link %>*
  </p>
  <p>
    <%= f.label :img ,"图像" %>
    <%= f.file_field :image %><%=image_tag @cycle.img ? "newsimgs/"+@cycle.img : "no_image",:size=>"40x40" %>
  </p>
  <p>
    <%= f.label :sort ,"排序" %>
    <%= f.text_field :sort ,:size=>4 %>*
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Back', cycles_path %>
<fieldset class="demo">
  <LEGEND>操作说明：</LEGEND>
  <p>
    编辑首页循环图像,*为必填项。
  </p>
</fieldset>
